package com.fafu.rbac.domain.query;

import com.fafu.common.web.mybatis.Logic;
import com.fafu.common.web.mybatis.RangeBean;
import com.fafu.common.web.mybatis.anno.EQ;
import com.fafu.common.web.mybatis.anno.Like;
import com.fafu.common.web.mybatis.anno.NE;
import com.fafu.common.web.query.BaseQuery;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.time.LocalDate;

/**
    * 用户表
    */
@Getter
@Setter
@ToString(callSuper = true)
public class UserQuery extends BaseQuery {

    /**
     * 昵称
     */
    @Like
    private String nickname;

    /**
     * 性别：1女 2男 3未知
     */
    private Integer gender;

    /**
     * 生日：下限
     */
    private RangeBean<LocalDate> birth;

    /**
     * 电话
     */
    @Like
    private String tel;

    /**
     * 外键：角色编号
     */
    private Long roleId;

    /**
     * 状态：1未激活 2激活
     */
    private Integer state;

    @Builder
    public UserQuery(Integer pageNum, Integer pageSize, String nickname, Integer gender, RangeBean<LocalDate> birth, String tel, Long roleId, Integer state) {
        super(pageNum, pageSize);
        this.nickname = nickname;
        this.gender = gender;
        this.birth = birth;
        this.tel = tel;
        this.roleId = roleId;
        this.state = state;
    }
}